package com.zygvip.demand.entity;

import com.google.common.base.Objects;
import com.zygvip.demand.core.BaseEntity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Description
 *
 * @author 马乌提
 * @create 2018-02-05 16:22
 */
@Entity
@Table(name = "app_require", schema = "demand", catalog = "")
public class AppRequire extends BaseEntity{

    private Integer id;
    private String content;
    private Integer industryId;
    private String realname;
    private String mobile;
    private String email;
    private Timestamp gmtCreated;
    private Timestamp gmtModified;
    private Timestamp sendTime;
    private Byte isSend;
    private Byte hasContact;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "industry_id")
    public Integer getIndustryId() {
        return industryId;
    }

    public void setIndustryId(Integer industryId) {
        this.industryId = industryId;
    }

    @Basic
    @Column(name = "realname")
    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "gmt_created")
    public Timestamp getGmtCreated() {
        return gmtCreated;
    }

    public void setGmtCreated(Timestamp gmtCreated) {
        this.gmtCreated = gmtCreated;
    }

    @Basic
    @Column(name = "gmt_modified")
    public Timestamp getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Timestamp gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Basic
    @Column(name = "send_time")
    public Timestamp getSendTime() {
        return sendTime;
    }

    public void setSendTime(Timestamp sendTime) {
        this.sendTime = sendTime;
    }

    @Basic
    @Column(name = "is_send")
    public Byte getIsSend() {
        return isSend;
    }

    public void setIsSend(Byte isSend) {
        this.isSend = isSend;
    }

    @Basic
    @Column(name = "has_contact")
    public Byte getHasContact() {
        return hasContact;
    }

    public void setHasContact(Byte hasContact) {
        this.hasContact = hasContact;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AppRequire require = (AppRequire) o;
        return Objects.equal(getId(), require.getId()) &&
                Objects.equal(getContent(), require.getContent()) &&
                Objects.equal(getIndustryId(), require.getIndustryId()) &&
                Objects.equal(getRealname(), require.getRealname()) &&
                Objects.equal(getMobile(), require.getMobile()) &&
                Objects.equal(getEmail(), require.getEmail()) &&
                Objects.equal(getGmtCreated(), require.getGmtCreated()) &&
                Objects.equal(getGmtModified(), require.getGmtModified()) &&
                Objects.equal(getSendTime(), require.getSendTime()) &&
                Objects.equal(getIsSend(), require.getIsSend()) &&
                Objects.equal(getHasContact(), require.getHasContact());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(super.hashCode(), getId(), getContent(), getIndustryId(), getRealname(), getMobile(), getEmail(), getGmtCreated(), getGmtModified(), getSendTime(), getIsSend(), getHasContact());
    }

    @Override
    public String toString() {
        return "AppRequire{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", industryId=" + industryId +
                ", realname='" + realname + '\'' +
                ", mobile='" + mobile + '\'' +
                ", email='" + email + '\'' +
                ", gmtCreated=" + gmtCreated +
                ", gmtModified=" + gmtModified +
                ", sendTime=" + sendTime +
                ", isSend=" + isSend +
                ", hasContact=" + hasContact +
                '}';
    }
}
